From cc18c051ef3eec3ac877735e8199b6e895b24491 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Tue, 15 Apr 2025 20:28:33 -0300 Subject: [PATCH] deploy: only set aboot/abootcfg when found Bootloader entry should only have aboot and abootcfg configuration entries when aboot.img is found on the system (e.g. /usr/lib/modules/$kver). Otherwise it will be always set, won't be used during boot and systemd-boot will complain about unknown lines. Tested-by: Brian Masney Signed-off-by: Ricardo Salveti --- src/libostree/ostree-sysroot-deploy.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index 49168d4f..45445918 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -2114,17 +2114,10 @@ install_deployment_kernel (OstreeSysroot *sysroot, int new_bootversion, { g_autofree char *aboot_relpath = g_strconcat ("/", bootcsumdir, "/", aboot_fn, NULL); ostree_bootconfig_parser_set (bootconfig, "aboot", aboot_relpath); - } - else - { - g_autofree char *aboot_relpath - = g_strconcat ("/", deployment_dirpath, "/usr/lib/ostree-boot/aboot.img", NULL); - ostree_bootconfig_parser_set (bootconfig, "aboot", aboot_relpath); - } - g_autofree char *abootcfg_relpath - = g_strconcat ("/", deployment_dirpath, "/usr/lib/ostree-boot/aboot.cfg", NULL); - ostree_bootconfig_parser_set (bootconfig, "abootcfg", abootcfg_relpath); + g_autofree char *abootcfg_relpath = g_strconcat ("/", bootcsumdir, "/aboot.cfg", NULL); + ostree_bootconfig_parser_set (bootconfig, "abootcfg", abootcfg_relpath); + } if (kernel_layout->devicetree_namever) { -- 2.30.2